package edu.sctu.practice.class02.hujie.cgs.practice02.test09;

/**
 * Created by hj on 2015/10/22.
 */
//arithmetic：运算
public class Arithmetic {
    //两个计算的数
    double a;
    double b;
    double result;

    public Arithmetic(double a, double b) {
        this.a = a;
        this.b = b;
    }

    public double add() {
        result = a + b;
        return result;
    }

    public double sub() {
        result = a - b;
        return result;
    }

    public double multiplication() {
        result = a * b;
        return result;
    }

    public double division() {
        result = a / b;
        return result;
    }

}
